package com.app.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 消费多少送多少订单记录
 * </p>
 *
 * @author yoominic
 * @since 2024-07-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_consumption_order")
public class ConsumptionOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单表ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单号
     */
    private String orderId;

    /**
     * 订单状态 1待核销 2已核销 3已取消
     */
    private Integer status;

    /**
     * 订单金额
     */
    private BigDecimal orderMoney;

    /**
     * 商家ID
     */
    private Integer businessId;

    /**
     * 活动ID
     */
    private Integer activityId;

    /**
     * 用户ID
     */
    private Integer userId;

    private BigDecimal businessIncome; // 商家收益

    private BigDecimal platformIncome; // 平台收益

    /**
     * 核验码
     */
    private String verificationCode;

    private String verificationFilepath;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp updateTime;

    /**
     * 取消原因
     */
    private Integer orderReason;

    private String areaId;

    private String cityId;

    private String commentstr;

    @TableField(exist = false)
    private UserModel userInfo;


    @TableField(exist = false)
    private BusinessModel businessInfo;

    @TableField(exist = false)
    private String cityAreaName;

    @TableField(exist = false)
    private ActivityModel activityInfo;

    @TableField(exist = false)
    private List<ConsumptionVoucher> consumptionVoucherList;

}
